<a data-toggle="modal" href="#modal-show-{!! $data->id !!}">
  查看
</a>
&middot;
<div id="modal-show-{!! $data->id !!}" class="modal text-left fade">
  <div class="modal-dialog">
    <div class="modal-content">
      
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h1 class="modal-title">进货单详情</h1>
      </div>
      <div class="modal-body">
          <table class="table table-bordered">
              <tr>
                  <td>进货单号:</td>
                  <td>{!! $data->codeno !!}</td>
                  <td>供应商:</td>
                  <td>{!! $data->company !!}</td>
              </tr>
              <tr>
                  <td>进货总数:</td>
                  <td>{!! $data->purchase_nums !!}</td>
                  <td>总金额:</td>
                  <td>{!! $data->all_price !!}元</td>
              </tr>
              <tr>
                 
                  <td>创建时间:</td>
                  <td>{!! $data->created_at->format('Y-m-d') !!}</td>
                  <td></td>
                  <td></td>
              </tr>
              <tr>
                  <td colspan="4">备注:{!! $data->remark !!}</td>
              </tr>
          </table>
          <div class="content">进货明细</div>
          <table class="table">
              <thead>
                  <tr>
                      <th>产品名/型号</th>
                      <th>数量</th>
                      <th>单价</th>
                      <th>金额</th>
                  </tr>
              </thead>
              <tbody>
             @foreach($data->purchase_item as $i)
             <tr>
                 <td>{!! $i->goods->name !!}/{!! $i->goods->codeno !!}</td>
                 <td>{!! $i->purchase_nums !!}</td>
                 <td>{!! $i->purchase_price !!}元</td>
                 <td>{!! $i->purchase_price*$i->purchase_nums !!}元</td>
             </tr>
             @endforeach
              </tbody>
          </table>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
      </div>

    </div><!-- /.modal-content -->
  </div><!-- /.modal-dialog -->
</div><!-- /.modal -->
